package com.zhuang.designpattern.visitor.user.impl;

import com.zhuang.designpattern.visitor.user.User;
import com.zhuang.designpattern.visitor.visitor.Visitor;
/**
 * description: Student
 * date: 2022/9/22 17:13
 * author: Zhuang
 * version: 1.0
 */
public class Student extends User {

    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }
    public void accept(Visitor visitor) {
        visitor.visit(this);

    }

    public int ranking() {
        return (int) (Math.random() * 100);
    }

}
